<HTML>
<HEAD>
<!-- This HTML file has been created by texi2html 1.45
     from schintro.txi on 19 Febuary 1997 -->

<TITLE>An Introduction to Scheme and its Implementation - Type Predicates</TITLE>
</HEAD>
<BODY>
Go to the <A HREF="schintro_1.html">first</A>, <A HREF="schintro_47.html">previous</A>, <A HREF="schintro_49.html">next</A>, <A HREF="schintro_143.html">last</A> section, <A HREF="schintro_toc.html">table of contents</A>.
<HR>


<H3><A NAME="SEC55" HREF="schintro_toc.html#SEC55">Type Predicates</A></H3>

<P>
<A NAME="IDX47"></A>

</P>
<P>
Scheme provides built-in procedures to test whether values refer
to objects of particular types.  If you want to know whether
the value of variable <CODE>x</CODE> is (a pointer to) pair, you can use
the predicate <CODE>pair?</CODE>, like this: <CODE>(pair? x)</CODE>.

</P>
<P>
Likewise, if you want to know if something is a number, you can
use the predicate <CODE>number?</CODE>.  If you want to know whether
a value is an integer, and not just some kind of number, you
can use <CODE>integer?</CODE>.

</P>
<P>
Several other type predicates are provided, for other data types
we'll discuss later, including <CODE>string?</CODE>, <CODE>character?</CODE>,
<CODE>vector?</CODE>, and <CODE>port?</CODE>.

</P>
<HR>
Go to the <A HREF="schintro_1.html">first</A>, <A HREF="schintro_47.html">previous</A>, <A HREF="schintro_49.html">next</A>, <A HREF="schintro_143.html">last</A> section, <A HREF="schintro_toc.html">table of contents</A>.
</BODY>
</HTML>
